<?

if($stamdata['type'] == "entitet") {
	$stamdata['type'] = "gruppe";
}
/*

	if($stamdata['type'] == "entitet") {
		if(in_array("gruppe",$element_typer)) {
			$data['type'] = "gruppe";
		}
		if(in_array("individ",$element_typer)) {
			$data['type'] = "individ";
		}
	}
	else { $data['type'] = $stamdata['type']; }

$data['stamdata'] = $stamdata;

$this->load->view("forms/rediger_over", $data);*/

$data['redirect_soegning'] = base_url()."core/rediger/tilfoej_oplevelser/";

//$over_ider = $over_ider;
$type = "begivenhed";
$omraade = "begivenhed";
$kriterie = "opret";

?>

<div class="row-fluid">
	<div class="span6">

    <input type="text" id="soegning" value="Søg" /> <img id="soeg_over" src="<? echo base_url(); ?>img/lup.png" />
	<input type="hidden" id="overtype" value="<? echo $stamdata['type']; ?>">

	<form action="<?php echo base_url();?>core/opret/relation/<? echo $stamdata['id']; ?>/over" method="post">
	<!--input type="hidden" name="kriterie" value="<? echo $kriterie; ?>">
	<input type="hidden" name="omraade" value="<? echo $omraade; ?>">
	<input type="hidden" name="type" value="<? echo $type; ?>"-->
	<input type="text" name="over_array" id="array_holder" value="">
	<input type="hidden" name="under_id" value="<? echo $id; ?>">
		<p class="ink" id="resultater-over" style="font-weight:bold;">
		
		
		</p>
		
		<input type="submit" value="Tilføj">
	</form>


</div>

	<div class="span6">
			<div style="overflow:auto;">
    <form action="<?php echo base_url();?>core/slet/over/<? echo $stamdata['id']; ?>" method="post"><?
    ?>
    <input type="hidden" name="stam_id" value="<? echo $stamdata['id']; ?>">

    <input style="float:right" type="submit" class="rubrik" value="Fjern Over">
    <h2 class="rubrik">Elementer, der ligger over <? echo $navne[0]; ?></h2><br>

    <?

        echo "<div style='float:left;'>";
            echo "<h3 class='rubrik'></h3>";
            echo "<p id='relation_over'>";
                foreach($over as $o)
            {
	
	                ?><input type="checkbox" name="<? echo $o['over_id'];?>" value="<? echo $o['over_id'];?>">
<?                  echo "<b class='ink'>".$o['navn']."</b>"; 
                    echo "<br>";
                  
		            $id_array[] = $o['over_id']; 
            }
 
	if(isset($id_array)) {$id_array = $this->array_model->post_ider_send($id_array);
	?><input type="hidden" name="id_array" value="<? echo $id_array; ?>">
	<input type="text" id="relation-over-array" name="id_array" value="">
	<?
    }
            echo "</p>";
        echo "</div>";


?>
		</div>
	</div>
</div>
